var e = getApp(), n = void 0;

Page({
    data: {
        msg: {},
        navigator: [ {
            icon: "/img/order.png",
            label: "提现",
            url: "/pages/runman/cash/cash?type=2"
        }, {
            icon: "/img/question.png",
            label: "跑男指南",
            url: "/pages/text/text?title=跑男指南&url=run_pointer"
        }, {
            icon: "/img/runman.png",
            label: "跑男设置",
            url: "/pages/runman/status/status"
        }, {
            icon: "/img/cphone.png",
            label: "跑男状态",
            url: "/pages/runman/verify/verify"
        }, {
            icon: "/img/pj.png",
            label: "我的评价",
            url: "/pages/runman/evaluate/evaluate"
        }, {
            icon: "/img/change.png",
            label: "切换为用户版",
            change: !0
        } ]
    },
    onLoad: function(e) {
        (n = this).getVerify(), n.getAnlysis();
    },
    getVerify: function() {
        wx.showLoading({
            title: "加载中"
        }), e.com.post("wx/service/find", {}, function(e) {
            wx.hideLoading(), 0 === e.errno && (n.setData({
                msg: e.data
            }), e.data.id || wx.redirectTo({
                url: "/pages/runman/register/register"
            }), 0 != e.data.status && 1 != e.data.verify.status || wx.redirectTo({
                url: "/pages/runman/verify/verify"
            }));
        });
    },
    getAnlysis: function() {
        e.com.post("wx/service/anlysis", {}, function(e) {
            0 === e.errno && n.setData(e.data);
        });
    },
    changePage: function() {
        wx.showModal({
            title: "提示",
            content: "您确定要切换版本吗？",
            success: function(e) {
                e.confirm && (wx.setStorageSync("page", "/pages/index/index"), wx.navigateBack({
                    delta: 1,
                    success: function() {
                        wx.redirectTo({
                            url: "/pages/index/index"
                        });
                    }
                }));
            }
        });
    }
});